package com.v2.k7;


import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 测试手动注入
 */
public class Test {

	public static void main(String[] args) {

		ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-k7.xml");

		//测试get/set是否必须
		User user = (User)applicationContext.getBean("user1");
		System.out.println(user);

		//测试构造是否必须
//		User user2 = (User)applicationContext.getBean("user2");
//		System.out.println(user2);

	}
}
